<script id="user_list_tpl" type="text/html">
    {{# if(d != null && d.length > 0){ }}
    {{# for(var i = 0 ; i < d.length ; i++){ }}

    <div class="search_result">
        <ul >
            <li><span>昵&nbsp;&nbsp;&nbsp;称：</span><i>{{d[i].nickName}}</i></li>
            <li><span>手机号：</span><i>{{d[i].phone}}</i></li>
        </ul>
        <div class="btn"><input type="button" onclick="bindPhone({{d[i].id}})"  value="绑定" class="button button-fill button-big" /></div>
    </div>


    {{# } }}
    {{# } }}
</script>
<script>

    function  bindPhone(id) {
        var searchPhone = $('#searchPhone').val();
        $.getJSON('/bill/bindingPhone',{ id:id},function (data) {
            console.log(data);
            console.log("data.success",data.success);
            if(data.success){
                $.toast('绑定成功')
                setTimeout("location.reload()", 2000);
                document.location.href='/bill/index';
            }else {
                $.toast('此手机号不存在')
            }
        })

    }

</script>